-- GENERATED SPELL FOR [Quarry Slave] --


function spell0_8917(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(9128,pUnit)
pUnit:RegisterEvent('Sorts_8917', 541, 1)
end

function spell1_8917(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8917', 10259, 1)
end

function spell2_8917(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_8917', 3000, 1)
end

function spell3_8917(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(12167,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8917', 3000, 1)
end

function spell4_8917(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(14516,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8917', 658, 1)
end

function spell5_8917(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(11971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8917', 30262, 1)
end

function spell6_8917(pUnit, Event) --@Throw,n/a--
pUnit:FullCastSpellOnTarget(15607,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8917', 593, 1)
end

function Sorts_8917(pUnit, Event)
local choix_sorts_8917 = math.random(0, 6)
if choix_sorts_8917 == 0 then
pUnit:RegisterEvent('spell0_8917', 1, 1)
end
if choix_sorts_8917 == 1 then
pUnit:RegisterEvent('spell1_8917', 1, 1)
end
if choix_sorts_8917 == 2 then
pUnit:RegisterEvent('spell2_8917', 1, 1)
end
if choix_sorts_8917 == 3 then
pUnit:RegisterEvent('spell3_8917', 1, 1)
end
if choix_sorts_8917 == 4 then
pUnit:RegisterEvent('spell4_8917', 1, 1)
end
if choix_sorts_8917 == 5 then
pUnit:RegisterEvent('spell5_8917', 1, 1)
end
if choix_sorts_8917 == 6 then
pUnit:RegisterEvent('spell6_8917', 1, 1)
end
end

function mob8917_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8917', math.random(1500, 3000), 1)
end

function mob8917_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8917_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8917_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8917, 1, 'mob8917_Action')
RegisterUnitEvent(8917, 2, 'mob8917_Leave')
RegisterUnitEvent(8917, 3, 'mob8917_Kill')
RegisterUnitEvent(8917, 4, 'mob8917_Die')
